package entity

import (
	"time"

	"gorm.io/gorm"
	"shqsoft.cn/pas3ui/base"
)

//CompAccoInrtUpdate
type CompAccoInrtUpdate struct {
	ID       int        `gorm:"AUTO_INCREMENT;primary_key;column:JLID"`
	ACNO     string     `gorm:"column:ACNO"`
	BANO     string     `gorm:"column:BANO"`
	CUNM     string     `gorm:"column:CUNM"`
	OPDT     *time.Time `gorm:"column:OPDT"`
	ACBL     float64    `gorm:"column:ACBL"`
	OldInrt  float64    `gorm:"column:OldInrt"`
	INRT     float64    `gorm:"column:INRT"`
	VLDT     *time.Time `gorm:"column:VLDT"`
	MODT     *time.Time `gorm:"column:MODT"`
	ITNM     string     `gorm:"column:ITNM"`
	InrtFlag string     `gorm:"column:InrtFlag"`
}

//TableName
func (CompAccoInrtUpdate) TableName() string {
	return "V_COMP_ACCO_INRT_UPDATE"
}

// AfterFind 查询后触发器
func (i *CompAccoInrtUpdate) AfterFind(tx *gorm.DB) (err error) {
	i.ACNO = base.CdnoTM(i.ACNO)
	i.BANO = base.AcnoTM(i.BANO)
	return
}
func CompAccoInrtUpdateEF() base.EntityFunc {
	return func() interface{} {
		entity := CompAccoInrtUpdate{}
		return &entity
	}
}
func CompAccoInrtUpdateESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []CompAccoInrtUpdate
		return &entities
	}
}

func init() {
	base.DaoPoolObj.Put("CompAccoInrtUpdate", base.NewDefaultDao(CompAccoInrtUpdateEF(), CompAccoInrtUpdateESF(), nil, "ch"))
}
